<%@page isELIgnored="false" import="java.net.*" %>
<%@taglib prefix="tiles" uri="struts-tiles" %>
<%@taglib prefix="html" uri="struts-html" %>
<%@taglib prefix="c" uri="jstl" %>
<%@taglib prefix="mcfn" uri="mcfn" %>
					<div id="bodyContent">
						<html:form action="/AssetsDetalle" styleId="FormaAlta" >
							<html:hidden property="cveAsset" value="${AssetDetail.cveAsset}"/>
						</html:form>
						<h1>Asset Detail</h1>
                                                <c:choose>
                                                    <c:when test="${UserLogin.actualRoleId eq 6}">
                                                        <div onclick="location.href='${URLBase}AssetsRegional.do';" style="display: inline; color: blue; font-size: 12px;" onmouseover="this.style.textDecoration='underline';this.style.cursor='pointer';" onmouseout="this.style.textDecoration='none';this.style.cursor='default';" >Assets</div>
                                                    </c:when>
                                                    <c:otherwise>
                                                        <div onclick="location.href='${URLBase}Assets.do';" style="display: inline; color: blue; font-size: 12px;" onmouseover="this.style.textDecoration='underline';this.style.cursor='pointer';" onmouseout="this.style.textDecoration='none';this.style.cursor='default';" >Assets</div>
                                                    </c:otherwise>
                                                </c:choose>
                                                <div style="display: inline; color: black; font-size: 12px;" > > </div><div style="display: inline; color: black; font-size: 12px;"  >Asset Detail (${AssetDetail.nombre})</div>
						<br/>
						<br/>
						<div class='errors'><html:errors/>${UserLogin.messageError}</div>
						<table class="tabForms">
							<tr>
								<td colspan='4'>
									<b>Asset Name</b>&nbsp;&nbsp;&nbsp;&nbsp;${AssetDetail.nombre}
<c:if test="${UserLogin.actualRoleId eq 2}">
    <c:if test="${AssetDetail.numDiasViaje eq 0}">
                                                                        <div style="color: #4995b5; display: inline ;" onmouseover="document.body.style.cursor = 'pointer';" onmouseout="document.body.style.cursor = 'default';" onclick="document.getElementById( 'FormaAlta' ).action = '${URLBase}AssetsEditar.do'; document.getElementById( 'FormaAlta' ).submit( );"><!-- [Editar] --><img src="images/btnEdit.gif" alt="Editar"/></div>
    </c:if>
									
									<div style="color: #4995b5; display: inline ;" onmouseover="document.body.style.cursor = 'pointer';" onmouseout="document.body.style.cursor = 'default';" onclick="document.getElementById( 'FormaAlta' ).action = '${URLBase}AssetsModificarPaquetes.do'; document.getElementById( 'FormaAlta' ).submit( );"><!-- [Paquetes] --><img src="images/btnPaquetes.gif" alt="Paquetes"/></div>
</c:if>
<c:if test="${UserLogin.actualRoleId eq 1}">
									<div style="color: #4995b5; display: inline ;" onmouseover="document.body.style.cursor = 'pointer';" onmouseout="document.body.style.cursor = 'default';" onclick="document.getElementById( 'FormaAlta' ).action = '${URLBase}SolicitarPaquetePreparacion.do'; document.getElementById( 'FormaAlta' ).submit( );"><!-- [Paquetes] --><img src="images/btnPaquetes.gif" alt="Paquetes"/></div>
</c:if>
								</td>
							</tr>
                                                        <c:if test="${origen eq 1}">
                                                            <tr>
                                                                <td colspan='2'><b>Country</b><br/>${pais}</td>                                                                    
                                                                <td colspan='2'>
                                                                    <b>Origin</b><br/>Asset created by the regioin
                                                                </td>
                                                            </tr>
                                                        </c:if>
                                                        <c:if test="${origen eq 0}">
                                                            <tr>
                                                                <td colspan='4'><b>Country</b><br/>${pais}</td>
                                                            </tr>
                                                        </c:if>
                                                            
                                                            
							<tr>
								<td colspan='4'><b>Description</b><br/><textarea styleClass="txtInput" style='width:99%;height:50px;' readonly="readonly">${AssetDetail.descripcion}</textarea></td>
							</tr>
							<tr>
								<td colspan='2'><b>Category</b>: ${AssetDetail.tblSubcateg.tblCategoria.nombre}</td>
								<td colspan='2'><b>Subcategory</b>:  ${AssetDetail.tblSubcateg.nombre}</td>
							</tr>
							<tr>
								<td><b>Event date</b>:<br/>${mcfn:formatDate(AssetDetail.fecha,'dd/MM/yyyy')}</td>
								<td><b>BC delivery date</b>:<br/>${mcfn:formatDate(AssetDetail.fecEntregaBc,'dd/MM/yyyy')}</td>
								<td><b>BC approval date</b>:<br/>${mcfn:formatDate(AssetDetail.fecAprobBc,'dd/MM/yyyy')}</td>
								<td><b>Quotation request deadline</b>:<br/>${mcfn:formatDate(AssetDetail.fecLimiteSolCot,'dd/MM/yyyy')}</td>
							</tr>
							<tr>
								<td><b>Purchase requisite deadline</b>:<br/>${mcfn:formatDate(AssetDetail.fecLimReqCompra,'dd/MM/yyyy')}</td>
								<td><b>Contract registration deadline</b>:<br/>${mcfn:formatDate(AssetDetail.fecLimSubeCont,'dd/MM/yyyy')}</td>
								<td><b>First invoice registration deadline</b>:<br/>${mcfn:formatDate(AssetDetail.fecLimPrimFact,'dd/MM/yyyy')}</td>
								<td><b>Seat confirmation date</b>:<br/>${mcfn:formatDate(AssetDetail.fecConfSede,'dd/MM/yyyy')}</td>
							</tr>
							<tr>
								<td><b>Campaign end date</b>:<br/>${mcfn:formatDate(AssetDetail.fecFinCamp,'dd/MM/yyyy')}</td>
								<td><b>Second invoice registration deadline</b>:<br/>${mcfn:formatDate(AssetDetail.fecLimSegFact,'dd/MM/yyyy')}</td>
								<td><b>Agenda delivery</b>:<br/>${mcfn:formatDate(AssetDetail.fecLimAgenda,'dd/MM/yyyy')}</td>
								<td><b>Winners delivery date</b>:<br/>${mcfn:formatDate(AssetDetail.fecLimGanadores,'dd/MM/yyyy')}</td>
							</tr>
							<tr>
								<td><b>Ticket delivery deadline</b>:<br/>${mcfn:formatDate(AssetDetail.fecLimBoletos,'dd/MM/yyyy')}</td>
								<td><b>Trip outbound date</b>:<br/>${mcfn:formatDate(AssetDetail.fecSalida,'dd/MM/yyyy')}</td>
								<td><b>Trip return date</b>:<br/>${mcfn:formatDate(AssetDetail.fecRegreso,'dd/MM/yyyy')}</td>
								<td><b>Evaluation date</b>:<br/>${mcfn:formatDate(AssetDetail.fecEva,'dd/MM/yyyy')}</td>
							</tr>
							<tr class="alt">
								<td><b>Number of days of travel</b>: -</td>
								<td><b>Dates confirmed</b>: <c:choose><c:when test="${AssetDetail.fechasConfirmadas eq 1}">YES</c:when><c:otherwise>NO</c:otherwise></c:choose></td>
								<td><b>Room type</b>: ${AssetDetail.tipoHabitacion}</td>
								<td colspan='1'>
									&nbsp;
								</td>
							</tr>
<c:if test="${UserLogin.actualRoleId eq 2}">
							<tr>
								<td><b>Simple local</b>: ${AssetDetail.costoSenLoc}</td>
								<td><b>Double local</b>: ${AssetDetail.costoDobLoc}</td>
								<td><b>Simple Regional</b>: ${AssetDetail.costoSenReg}</td>
								<td><b>Double Regional</b>: ${AssetDetail.costoDobReg}</td>
							</tr>
</c:if>
						</table>
						<br/>
						<br/>
<c:if test="${UserLogin.actualRoleId eq 2}">
						<table class="tabForms">
							<tr>
								<td>
									<br/>
									<b>Number of batches: </b>${PackageManager.quantityOfPackage} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									[<div style="color: #4995b5; display: inline ;" onmouseover="document.body.style.cursor = 'pointer';" onmouseout="document.body.style.cursor = 'default';" onclick="document.getElementById( 'FormaAlta' ).action = '${URLBase}AssetsModificarPaquetes.do'; document.getElementById( 'FormaAlta' ).submit( );">Edit</div>]
									<br/>
									<br/>
									<b>Batches of Asset</b>: ${PackageManager.quantityOfPackage}
								</td>
							</tr>
<c:if test="${PackageManager.quantityOfPackage gt 0}">
							<tr>
								<td colspan='4'>
									<table width='100%' class='AssetPaqueteTableDisplayPaquetes'>
										<thead>
											<tr>
												<th>Room type</td>
												<th>Anchored to:</td>
												<th>Invoiced to:</td>
												<th>Number</td>
											</tr>
										</thead>
<c:if test="${PackageManager.paqueteSLL.cantidad gt 0}">
										<tr>
											<td><b>${PackageManager.paqueteSLL.tipoHabitacion}</b></td>
											<td><b>${PackageManager.paqueteSLL.fondeadoA}</b></td>
											<td><b>${PackageManager.paqueteSLL.facturadoA}</b></td>
											<td><b>${PackageManager.paqueteSLL.cantidad}</b></td>
										</tr>
</c:if>

<c:if test="${PackageManager.paqueteSLR.cantidad gt 0}">
										<tr>
											<td><b>${PackageManager.paqueteSLR.tipoHabitacion}</b></td>
											<td><b>${PackageManager.paqueteSLR.fondeadoA}</b></td>
											<td><b>${PackageManager.paqueteSLR.facturadoA}</b></td>
											<td><b>${PackageManager.paqueteSLR.cantidad}</b></td>
										</tr>
</c:if>

<c:if test="${PackageManager.paqueteSRL.cantidad gt 0}">
										<tr>
											<td><b>${PackageManager.paqueteSRL.tipoHabitacion}</b></td>
											<td><b>${PackageManager.paqueteSRL.fondeadoA}</b></td>
											<td><b>${PackageManager.paqueteSRL.facturadoA}</b></td>
											<td><b>${PackageManager.paqueteSRL.cantidad}</b></td>
										</tr>
</c:if>

<c:if test="${PackageManager.paqueteSRR.cantidad gt 0}">
										<tr>
											<td><b>${PackageManager.paqueteSRR.tipoHabitacion}</b></td>
											<td><b>${PackageManager.paqueteSRR.fondeadoA}</b></td>
											<td><b>${PackageManager.paqueteSRR.facturadoA}</b></td>
											<td><b>${PackageManager.paqueteSRR.cantidad}</b></td>
										</tr>
</c:if>

<c:if test="${PackageManager.paqueteDLL.cantidad gt 0}">
										<tr>
											<td><b>${PackageManager.paqueteDLL.tipoHabitacion}</b></td>
											<td><b>${PackageManager.paqueteDLL.fondeadoA}</b></td>
											<td><b>${PackageManager.paqueteDLL.facturadoA}</b></td>
											<td><b>${PackageManager.paqueteDLL.cantidad}</b></td>
										</tr>
</c:if>

<c:if test="${PackageManager.paqueteDLR.cantidad gt 0}">
										<tr>
											<td><b>${PackageManager.paqueteDLR.tipoHabitacion}</b></td>
											<td><b>${PackageManager.paqueteDLR.fondeadoA}</b></td>
											<td><b>${PackageManager.paqueteDLR.facturadoA}</b></td>
											<td><b>${PackageManager.paqueteDLR.cantidad}</b></td>
										</tr>
</c:if>

<c:if test="${PackageManager.paqueteDRL.cantidad gt 0}">
										<tr>
											<td><b>${PackageManager.paqueteDRL.tipoHabitacion}</b></td>
											<td><b>${PackageManager.paqueteDRL.fondeadoA}</b></td>
											<td><b>${PackageManager.paqueteDRL.facturadoA}</b></td>
											<td><b>${PackageManager.paqueteDRL.cantidad}</b></td>
										</tr>
</c:if>

<c:if test="${PackageManager.paqueteDRR.cantidad gt 0}">
										<tr>
											<td><b>${PackageManager.paqueteDRR.tipoHabitacion}</b></td>
											<td><b>${PackageManager.paqueteDRR.fondeadoA}</b></td>
											<td><b>${PackageManager.paqueteDRR.facturadoA}</b></td>
											<td><b>${PackageManager.paqueteDRR.cantidad}</b></td>
										</tr>
</c:if>
									</table>
								</td>
							</tr>
</c:if>
						</table>
</c:if>
					</div>
					<div id="footContent"></div>
	